﻿namespace GameLib.Games.Components
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public class ModConflictResolver<T> : IModMatcherResolver<T> where T : IMod
    {
        public IList<MatcherStruct<T>> Resolve(IModMatcher matcher, IModCollection<T> mods)
        {
            IList<MatcherStruct<T>> result = new List<MatcherStruct<T>>();
            foreach (T mod in matcher.Match(mods))
            {
                result.Add(new MatcherStruct<T>(matcher, mod));
            }
            return result;
        }
    }
}
